home *** CD-ROM | disk | FTP | other *** search
/ Looney Tunes Photo Print Studio (Special Edition) / LIVEPIX.iso / ORIENTAT / DATA / LPORIENT.DXR / 00004_audio scripts.ls < prev    next >
Encoding:
Text File  |  1998-01-16  |  1.6 KB  |  62 lines

  1. global gAudioList, gCurr, gAudioPath, gAudioPlayFlag
  2.  
  3. on PlayAudio aPrp, aChan
  4.   global gLastSnd1, gLastSnd2, gLastSnd3
  5.   if voidp(aChan) then
  6.     set aChan to 1
  7.   end if
  8.   set str to getaProp(gAudioList, aPrp)
  9.   set aSnd to item 1 of str
  10.   set vol to item 2 of str
  11.   if aChan = 1 then
  12.     if soundBusy(aChan) then
  13.       if gLastSnd1 = aSnd then
  14.         nothing()
  15.       else
  16.         sound stop aChan
  17.         set the volume of sound aChan to value(vol)
  18.         puppetSound(aChan, aSnd)
  19.         set gLastSnd1 to aSnd
  20.       end if
  21.     else
  22.       set the volume of sound aChan to value(vol)
  23.       puppetSound(aChan, aSnd)
  24.       set gLastSnd1 to aSnd
  25.     end if
  26.   else
  27.     if aChan = 2 then
  28.       if soundBusy(aChan) then
  29.         if gLastSnd2 = aSnd then
  30.           nothing()
  31.         else
  32.           sound stop aChan
  33.           set the volume of sound aChan to value(vol)
  34.           puppetSound(aChan, aSnd)
  35.           set gLastSnd2 to aSnd
  36.         end if
  37.       else
  38.         set the volume of sound aChan to value(vol)
  39.         puppetSound(aChan, aSnd)
  40.         set gLastSnd2 to aSnd
  41.       end if
  42.     else
  43.       if aChan = 3 then
  44.         if soundBusy(aChan) then
  45.           if gLastSnd3 = aSnd then
  46.             nothing()
  47.           else
  48.             sound stop aChan
  49.             set the volume of sound aChan to value(vol)
  50.             sound playFile aChan, gAudioPath & aSnd
  51.             set gLastSnd3 to aSnd
  52.           end if
  53.         else
  54.           set the volume of sound aChan to value(vol)
  55.           sound playFile aChan, gAudioPath & aSnd
  56.           set gLastSnd3 to aSnd
  57.         end if
  58.       end if
  59.     end if
  60.   end if
  61. end
  62.